<template>
  <n-layout-header class="navbar-container">
    <div class="navbar-content">
      <!-- Logo 区域 -->
      <div class="logo-section" @click="$router.push('/')">
        <div class="robot-icon">
          🎯
        </div>
        <span class="logo-text gradient-text">AI梦工厂</span>
      </div>

      <!-- 导航菜单 -->
      <nav class="nav-menu">
        <router-link
          v-for="item in menuItems"
          :key="item.path"
          :to="item.path"
          class="nav-item"
          :class="{ active: $route.path === item.path }"
        >
          <n-icon :size="18" class="nav-icon">
            <component :is="item.icon" />
          </n-icon>
          <span>{{ item.name }}</span>
        </router-link>
      </nav>

      <!-- 用户区域 -->
      <div class="user-section">
        <!-- 移除了登录功能，系统无需登录 -->
      </div>
    </div>

    <!-- 移除了登录和注册模态框 -->
  </n-layout-header>
</template>

<script setup lang="ts">
import { Home, Apps, ChatbubbleEllipses } from '@vicons/ionicons5'

// 菜单项
const menuItems = [
  {
    name: '首页',
    path: '/',
    icon: Home
  },
  {
    name: '套餐价格',
    path: '/products',
    icon: Apps
  },
  {
    name: '联系我们',
    path: '/contact',
    icon: ChatbubbleEllipses
  }
]

// 移除了登录相关处理函数
</script>

<style scoped>
.navbar-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(254, 44, 85, 0.1);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
}

.logo-section {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.robot-icon {
  font-size: 32px;
  margin-right: 12px;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: #cccccc;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(254, 44, 85, 0.1);
}

.nav-item.active {
  color: #FE2C55;
  background: rgba(254, 44, 85, 0.1);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, #FE2C55, #8B5CF6);
  border-radius: 1px;
}

.nav-icon {
  color: inherit;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 移除了登录相关的样式 */


/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-content {
    padding: 0 16px;
  }

  .nav-menu {
    gap: 16px;
  }

  .nav-item span {
    display: none;
  }

  .logo-text {
    display: none;
  }
}
</style>
